<script type="text/javascript">
    function testConfirmMsg(url, data) {
        alertMsg.confirm("您修改的资料未保存，请选择保存或取消！", {
            okCall: function () {
                $.post(url, data, DWZ.ajaxDone, "json");
            }
        });
    }

    function testAlertError() {
        alertMsg.error("点击确定关闭当前窗口！", {
            okCall: function () {
                navTab.closeCurrentTab();
            }
        });
    }

    function testAlertMisc() {
        var buttons = [
            {
                name: '是',
                call: function () {
                    console.log('testAlertMisc(): 是');
                },
                keyCode: DWZ.keyCode.ENTER
            },
            {
                name: '否',
                call: function () {
                    console.log('testAlertMisc(): 否');
                }
            },
            {
                name: '取消',
                call: function () {
                    console.log('testAlertMisc(): 取消');
                },
                keyCode: DWZ.keyCode.ESC
            }
        ];
        alertMsg.open(alertMsg.types.confirm, '自定义提示框', buttons);
    }
</script>

<h2 class="contentTitle">提示对话框演示</h2>

<div style="padding:0 10px;">

    <div class="tabs">
        <div class="tabsHeader">
            <div class="tabsHeaderContent">
                <ul>
                    <li class="selected"><a href="javascript:;"><span>示例</span></a></li>
                    <li><a href="javascript:;"><span>代码</span></a></li>
                </ul>
            </div>
        </div>
        <div class="tabsContent" layoutH="100">
            <div>
                <a class="button" href="javascript:;" onclick="testConfirmMsg('demo/common/ajaxDone.html')"><span>确认（是/否）</span></a><br/><br/><br/>
                <a class="button" href="javascript:;"
                   onclick="alertMsg.error('您提交的数据有误，请检查后重新提交！')"><span>错误提示</span></a><br/><br/><br/>
                <a class="button" href="javascript:;"
                   onclick="alertMsg.info('您提交的数据有误，请检查后重新提交！')"><span>信息提示</span></a><br/><br/><br/>
                <a class="button" href="javascript:;"
                   onclick="alertMsg.warn('您提交的数据有误，请检查后重新提交！')"><span>警告提示</span></a><br/><br/><br/>
                <a class="button" href="javascript:;" onclick="alertMsg.correct('您的数据提交成功！')"><span>成功提示</span></a><br/><br/><br/>
                <a class="button" href="javascript:;"
                   onclick="testAlertError()"><span>错误提示,点击确定关闭窗口</span></a><br/><br/><br/>
                <a class="button" href="javascript:;" onclick="testAlertMisc()"><span>自定义提示框</span></a><br/><br/><br/>
            </div>

            <div>
				<textarea name="textarea" cols="100" rows="15">
<script type="text/javascript">
function testConfirmMsg(url, data) {
    alertMsg.confirm("您修改的资料未保存，请选择保存或取消！", {
        okCall: function () {
            $.post(url, data, DWZ.ajaxDone, "json");
        }
    });
}
</script>

<a class="button" href="javascript:;"
   onclick="testConfirmMsg('demo/common/ajaxDone.html')"><span>确认（是/否）</span></a><br/><br/>
<a class="button" href="javascript:;" onclick="alertMsg.error('您提交的数据有误，请检查后重新提交！')"><span>错误提示</span></a><br/><br/>
<a class="button" href="javascript:;" onclick="alertMsg.info('您提交的数据有误，请检查后重新提交！')"><span>信息提示</span></a><br/><br/>
<a class="button" href="javascript:;" onclick="alertMsg.warn('您提交的数据有误，请检查后重新提交！')"><span>警告提示</span></a><br/><br/>
<a class="button" href="javascript:;" onclick="alertMsg.correct('您的数据提交成功！')"><span>成功提示</span></a><br/><br/>
				</textarea>
            </div>
        </div>
        <div class="tabsFooter">
            <div class="tabsFooterContent"></div>
        </div>
    </div>

</div>